﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AMPSDAO.Entity.Attributes
{
    [System.AttributeUsage(System.AttributeTargets.All | System.AttributeTargets.Struct)]
    public class ColumnAttribute : System.Attribute
    {
        public ColumnAttribute()
        {
            name = "";
            notNull = false;
            dataType = "";
            length = 0;
            primaryKey = false;
            foreinKey = false;
        }

        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        private bool notNull;

        public bool NotNull
        {
            get { return notNull; }
            set { notNull = value; }
        }

        private string dataType;

        public string DataType
        {
            get { return dataType; }
            set { dataType = value; }
        }

        private int length;

        public int Length
        {
            get { return length; }
            set { length = value; }
        }

        private bool primaryKey;

        public bool PrimaryKey
        {
            get { return primaryKey; }
            set { primaryKey = value; }
        }

        private bool foreinKey;

        public bool ForeinKey
        {
            get { return foreinKey; }
            set { foreinKey = value; }
        }
    }
}
